3.1.3 \(\int \sinh ^2(c+d x) (a+b \sinh ^2(c+d x)) \, dx\) [3]

Optimal. Leaf size=61 \[ -\frac {1}{8} (4 a-3 b) x+\frac {(4 a-3 b) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac {b \cosh (c+d x) \sinh ^3(c+d x)}{4 d} \]

[Out]

-1/8*(4*a-3*b)*x+1/8*(4*a-3*b)*cosh(d*x+c)*sinh(d*x+c)/d+1/4*b*cosh(d*x+c)*sinh(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3093, 2715, 8} \begin {gather*} \frac {(4 a-3 b) \sinh (c+d x) \cosh (c+d x)}{8 d}-\frac {1}{8} x (4 a-3 b)+\frac {b \sinh ^3(c+d x) \cosh (c+d x)}{4 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sinh[c + d*x]^2*(a + b*Sinh[c + d*x]^2),x]

[Out]

-1/8*((4*a - 3*b)*x) + ((4*a - 3*b)*Cosh[c + d*x]*Sinh[c + d*x])/(8*d) + (b*Cosh[c + d*x]*Sinh[c + d*x]^3)/(4*
d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 3093

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos
[e + f*x]*((b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Dist[(A*(m + 2) + C*(m + 1))/(m + 2), Int[(b*Sin[e +
f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] &&  !LtQ[m, -1]

Rubi steps

\begin {align*} \int \sinh ^2(c+d x) \left (a+b \sinh ^2(c+d x)\right ) \, dx &=\frac {b \cosh (c+d x) \sinh ^3(c+d x)}{4 d}-\frac {1}{4} (-4 a+3 b) \int \sinh ^2(c+d x) \, dx\\ &=\frac {(4 a-3 b) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac {b \cosh (c+d x) \sinh ^3(c+d x)}{4 d}-\frac {1}{8} (4 a-3 b) \int 1 \, dx\\ &=-\frac {1}{8} (4 a-3 b) x+\frac {(4 a-3 b) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac {b \cosh (c+d x) \sinh ^3(c+d x)}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 47, normalized size = 0.77 \begin {gather*} \frac {-4 (4 a-3 b) (c+d x)+8 (a-b) \sinh (2 (c+d x))+b \sinh (4 (c+d x))}{32 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sinh[c + d*x]^2*(a + b*Sinh[c + d*x]^2),x]

[Out]

(-4*(4*a - 3*b)*(c + d*x) + 8*(a - b)*Sinh[2*(c + d*x)] + b*Sinh[4*(c + d*x)])/(32*d)

________________________________________________________________________________________

Maple [A]
time = 0.76, size = 46, normalized size = 0.75

method result size
default \(\frac {\left (-\frac {b}{2}+\frac {a}{2}\right ) \sinh \left (2 d x +2 c \right )}{2 d}-\frac {a x}{2}+\frac {3 b x}{8}+\frac {b \sinh \left (4 d x +4 c \right )}{32 d}\) \(46\)
risch \(\frac {3 b x}{8}-\frac {a x}{2}+\frac {{\mathrm e}^{4 d x +4 c} b}{64 d}+\frac {{\mathrm e}^{2 d x +2 c} a}{8 d}-\frac {{\mathrm e}^{2 d x +2 c} b}{8 d}-\frac {{\mathrm e}^{-2 d x -2 c} a}{8 d}+\frac {{\mathrm e}^{-2 d x -2 c} b}{8 d}-\frac {{\mathrm e}^{-4 d x -4 c} b}{64 d}\) \(100\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(d*x+c)^2*(a+b*sinh(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/2*(-1/2*b+1/2*a)*sinh(2*d*x+2*c)/d-1/2*a*x+3/8*b*x+1/32*b/d*sinh(4*d*x+4*c)

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 97, normalized size = 1.59 \begin {gather*} \frac {1}{64} \, b {\left (24 \, x + \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} - \frac {8 \, e^{\left (2 \, d x + 2 \, c\right )}}{d} + \frac {8 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d} - \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} - \frac {1}{8} \, a {\left (4 \, x - \frac {e^{\left (2 \, d x + 2 \, c\right )}}{d} + \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)^2*(a+b*sinh(d*x+c)^2),x, algorithm="maxima")

[Out]

1/64*b*(24*x + e^(4*d*x + 4*c)/d - 8*e^(2*d*x + 2*c)/d + 8*e^(-2*d*x - 2*c)/d - e^(-4*d*x - 4*c)/d) - 1/8*a*(4
*x - e^(2*d*x + 2*c)/d + e^(-2*d*x - 2*c)/d)

________________________________________________________________________________________

Fricas [A]
time = 0.53, size = 64, normalized size = 1.05 \begin {gather*} \frac {b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} - {\left (4 \, a - 3 \, b\right )} d x + {\left (b \cosh \left (d x + c\right )^{3} + 4 \, {\left (a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{8 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)^2*(a+b*sinh(d*x+c)^2),x, algorithm="fricas")

[Out]

1/8*(b*cosh(d*x + c)*sinh(d*x + c)^3 - (4*a - 3*b)*d*x + (b*cosh(d*x + c)^3 + 4*(a - b)*cosh(d*x + c))*sinh(d*
x + c))/d

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 158 vs. \(2 (53) = 106\).
time = 0.19, size = 158, normalized size = 2.59 \begin {gather*} \begin {cases} \frac {a x \sinh ^{2}{\left (c + d x \right )}}{2} - \frac {a x \cosh ^{2}{\left (c + d x \right )}}{2} + \frac {a \sinh {\left (c + d x \right )} \cosh {\left (c + d x \right )}}{2 d} + \frac {3 b x \sinh ^{4}{\left (c + d x \right )}}{8} - \frac {3 b x \sinh ^{2}{\left (c + d x \right )} \cosh ^{2}{\left (c + d x \right )}}{4} + \frac {3 b x \cosh ^{4}{\left (c + d x \right )}}{8} + \frac {5 b \sinh ^{3}{\left (c + d x \right )} \cosh {\left (c + d x \right )}}{8 d} - \frac {3 b \sinh {\left (c + d x \right )} \cosh ^{3}{\left (c + d x \right )}}{8 d} & \text {for}\: d \neq 0 \\x \left (a + b \sinh ^{2}{\left (c \right )}\right ) \sinh ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)**2*(a+b*sinh(d*x+c)**2),x)

[Out]

Piecewise((a*x*sinh(c + d*x)**2/2 - a*x*cosh(c + d*x)**2/2 + a*sinh(c + d*x)*cosh(c + d*x)/(2*d) + 3*b*x*sinh(
c + d*x)**4/8 - 3*b*x*sinh(c + d*x)**2*cosh(c + d*x)**2/4 + 3*b*x*cosh(c + d*x)**4/8 + 5*b*sinh(c + d*x)**3*co
sh(c + d*x)/(8*d) - 3*b*sinh(c + d*x)*cosh(c + d*x)**3/(8*d), Ne(d, 0)), (x*(a + b*sinh(c)**2)*sinh(c)**2, Tru
e))

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 79, normalized size = 1.30 \begin {gather*} -\frac {1}{8} \, {\left (4 \, a - 3 \, b\right )} x + \frac {b e^{\left (4 \, d x + 4 \, c\right )}}{64 \, d} + \frac {{\left (a - b\right )} e^{\left (2 \, d x + 2 \, c\right )}}{8 \, d} - \frac {{\left (a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{8 \, d} - \frac {b e^{\left (-4 \, d x - 4 \, c\right )}}{64 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)^2*(a+b*sinh(d*x+c)^2),x, algorithm="giac")

[Out]

-1/8*(4*a - 3*b)*x + 1/64*b*e^(4*d*x + 4*c)/d + 1/8*(a - b)*e^(2*d*x + 2*c)/d - 1/8*(a - b)*e^(-2*d*x - 2*c)/d
 - 1/64*b*e^(-4*d*x - 4*c)/d

________________________________________________________________________________________

Mupad [B]
time = 0.11, size = 50, normalized size = 0.82 \begin {gather*} \frac {\frac {a\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )}{4}-\frac {b\,\mathrm {sinh}\left (2\,c+2\,d\,x\right )}{4}+\frac {b\,\mathrm {sinh}\left (4\,c+4\,d\,x\right )}{32}}{d}-\frac {a\,x}{2}+\frac {3\,b\,x}{8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(c + d*x)^2*(a + b*sinh(c + d*x)^2),x)

[Out]

((a*sinh(2*c + 2*d*x))/4 - (b*sinh(2*c + 2*d*x))/4 + (b*sinh(4*c + 4*d*x))/32)/d - (a*x)/2 + (3*b*x)/8

________________________________________________________________________________________